<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="keywords" content="" />
<meta name="descrption" content="" />
<title>退休销户</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="../../../js/angular.js"></script>
<link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../../../layui/layui.js" charset="utf-8"></script>
<style>
         .layui-form-label{
         	 text-align: left;
             width:130px;
             height:30px;

     }
</style>
</head>
<body>

	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>退休销户</legend>
	</fieldset>
	
      <div ng-app="myApp" ng-controller="customersCtrl" align="center">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">姓名:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="xm" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">证件号码:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="zjhm" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">单位名称:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="dwmc" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
		</div>



		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">单位代码:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="dwzh" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">本金:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="bj" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">利息:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="lx" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
		</div>
		
        <div class="layui-form-item">
           <div class="layui-inline">
				<label class="layui-form-label">手机号码:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="sjhm" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">本息合计:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="ye" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">所属银行:</label>
				<div class="layui-input-inline">
                 <select ng-model="selectedyh" ng-model="shyh" ng-change="change()" style="width:100%;height:35px">
                      <option ng-repeat="x in yhnames" value="{{x.num}}">{{x.yh}}</option>
                </select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">销户原因:</label>
				<div class="layui-input-inline">
				 <select ng-model="selectedxh" ng-model="xhyymd" ng-change="xhyyf()" style="width:100%;height:35px;">
                      <option ng-repeat="x in xhyy" value="{{x.yy}}">{{x.xh}}</option>
                </select>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">联名卡号:</label>
				<div class="layui-input-inline">
					<input type="text" ng-model="lmkh" autocomplete="off"
						class="layui-input" readonly="readonly">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label"></label>
				<div class="layui-input-inline">
				
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" ng-click="tj()">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary" ng-click="cz()">重置</button>
			</div>
		</div>
	 </div>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element;
		});
	</script>
	<script type="text/javascript">
	
	function getPath() {  
	     
	        return 'http://'+location.host;
	}
		
		
	</script>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script type="text/javascript">
		 var app = angular.module('myApp', []);
		 app.controller('customersCtrl', function($scope, $http) {
		         $scope.yhnames = [
                 {yh : "建设银行", num : "建设"},
                 {yh : "工商银行", num : "工商"},
                 {yh : "农业银行", num : "农业"},
                 {yh : "中国银行", num : "中国"},
                 {yh : "邮储银行", num : "邮储"},
                 {yh : "吉林银行", num : "吉林"}
                  ];
                  $scope.change=function(){
                      var selectval=$scope.selectedyh;
                      $scope.shyh=selectval;
                  };
                  $scope.xhyy = [
                 {xh : "退休", yy : "退休"},
                 {xh : "离职", yy : "离职"},
                  ];
                  $scope.xhyyf=function(){
                   var selectxh=$scope.selectedxh;
                   $scope.xhyymd=selectxh;
                  };
			     $http({
					url : getPath() + "/wsyyt/txxhtqcontroller/test",
					contentType : "text/html;charset=utf-8",
					method : 'post',
				}).then(function(res) {
				     $scope.xm=res.data.data[0].XINGMING;
				     $scope.zjhm=res.data.data[0].ZJHM;
				     $scope.dwmc=res.data.data[0].DWMC;
				     $scope.dwzh=res.data.data[0].DWZH;
				     $scope.sjhm=res.data.data[0].DH;
				     $scope.lmkh=res.data.data[0].LMKH;
				     $scope.ye=res.data.data[0].YE;
				     $scope.lx=res.data.data[0].LX;
				     $scope.bj=res.data.data[0].BJ;
				
	      /** 提交申请function */
			$scope.tj = function() {
				$scope.params = {
				   dqdm:res.data.data[0].DQDM,
				   grzh:res.data.data[0].V_个人账号,
				   dwzh:$scope.dwzh,
				   xhyy:$scope.xhyymd,
				   kh:$scope.lmkh,
				   bj:$scope.bj,
				   lx:$scope.lx,
				   ye:$scope.ye,
			       yh:$scope.shyh,
			       gsdqdm:res.data.data[0].GSDQDM
				};
				$http({
					url : getPath() + "/wsyyt/txxhtqcontroller/test1",
					contentType : "text/html;charset=utf-8",
					method : 'post',
					params : $scope.params,
				}).then(function(res) {
				   $scope.code=res.data.code;
		           if($scope.code==0){
		   				layer.msg('提示：申请成功,等待审核.....',{icon: 5});
					}else{
		  				layer.msg('提示：'+res.data.CW,{icon: 5});
					}
				});
			  };
			  /**重置function  */
			  $scope.cz=function(){
			    $scope.xhyy="";
			    $scope.shyh="";
			  };
			});
		});
	</script>
</body>
</html>